package net.shopxx.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

/**
 * 实体类 - 颜色
 */

@Entity
@Table(name = "color")
public class Color extends BaseEntity {

	private static final long serialVersionUID = -6109590619136943215L;

	private Set<Productitem> productColorSet;
	private String name;// 名称
	private String logo;// Logo
	private Integer orderList;// 排序

	@OneToMany(fetch = FetchType.LAZY)
	@OrderBy("createDate desc")
	public Set<Productitem> getProductColorSet() {
		return productColorSet;
	}

	public void setproductColorSet(Set<Productitem> productColorSet) {
		this.productColorSet = productColorSet;
	}

	@Column(nullable = false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	@Column(nullable = false)
	public Integer getOrderList() {
		return orderList;
	}

	public void setOrderList(Integer orderList) {
		this.orderList = orderList;
	}

}